package com.superpai.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import com.superpai.R;

/**
 * @author Devin.Hu
 * @date 2011-8-14
 * @version V1.0
 * @description 加载页
 */
public class LoadingActivity extends Activity {

	private long time = 2000;
	Handler localHandler = new Handler();

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.loading);

		localHandler.postDelayed(new Runnable() {
			@Override
			public void run() {
				goHome();
			}
		}, time);

	}
	
	private void goHome() {
		Intent intent = new Intent(this, HomeActivity.class);
		startActivity(intent);
		finish();
	}
}
